Hi Tom,
Thanks, pause thread is what I was looking for if it makes that green light on the thread turn off and exit the thread. I did try threaddone, but it didn't workout.
On your recommendation for the simpleindexhomefunction, I wasn't real clear in my description about what on my axis is enabled. The only time homing thread stays running is because my axis motor is not physically enabled with power, but within the kflop axis screen, it is always enabled as long as my init file is running. So this Might not apply
Much appreciated, I will give it a go and let you know.
Thanks
Rob
Hi Rob,
I suspect the Home program is hung up waiting to hit the limit switch, but because the axis is disabled and doesn't move this never happens.
One solution would be to add a check in each wait for limit switch loop to check if the axis is not enabled, and if so exit. Something like in the SimpleHomeIndexFunction.c example:
while (ReadBit(limitbit)!=limitpolarity) // loop until Limit bit goes to specified polarity
if (!chan[axis].Enable) return 1; // abort/exit if disabled
Alternatively you could add a line if C code to your Reset/Initialization to Kill the Home thread (assuming it runs in Thread #2):
PauseThread(2);
HTH
Regards
TK